package com.sndscl.rpc.call;

import com.sndscl.rpc.common.dto.RpcRequest;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description
 * @Author lsh
 * @Date 2020/11/27 16:03
 **/
public class RpcRequestWarp {

    private RpcRequest rpcRequest;

    private List<NettyClient> failClients =  new ArrayList();

    private int failNum = 0;

    public RpcRequestWarp(RpcRequest rpcRequest){
        this.rpcRequest = rpcRequest;
    }

    public void addFailClient(NettyClient nettyClient){
        failClients.add(nettyClient);
        failNum ++;
    }

    public RpcRequest getRpcRequest() {
        return rpcRequest;
    }

    public List<NettyClient> getFailClients() {
        return failClients;
    }

    public int getFailNum() {
        return failNum;
    }
}
